window: Make unrealize work again
authorMatthias Clasen <mclasen@redhat.com>
Sat, 18 May 2019 13:39:12 +0000 (13:39 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:15 +0000 (20:25 +0000)
GtkWidgets unrealize accesses the frame clock
of the surface, so we need to keep the surface
in place until after we've chained up.

gtk/gtkwindow.c

index cef737d64755b215def460395ab975851fedc6c9..8e5ef0cdbdd4321c3d00212f7206e20cdb57aa89 100644 (file)
@@ -5836,12 +5836,13 @@ gtk_window_unrealize (GtkWidget *widget)
   g_signal_handlers_disconnect_by_func (surface, surface_size_changed, widget);
   g_signal_handlers_disconnect_by_func (surface, surface_render, widget);
   g_signal_handlers_disconnect_by_func (surface, surface_event, widget);
+
+  GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
+
   gdk_surface_set_widget (surface, NULL);
   gdk_surface_destroy (surface);
   g_clear_object (&priv->surface);
 
-  GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
-
   priv->hardcoded_surface = NULL;
 }